﻿Imports System.Globalization
Imports System.Threading

Public Class FormMain

    Private Sub អតថជនToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles អតថជនToolStripMenuItem.Click

        FormCustomer.MdiParent = Me
        FormCustomer.Show()

    End Sub

    Private Sub អនកលកToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles អនកលកToolStripMenuItem.Click
        FormVendor.MdiParent = Me
        FormVendor.WindowState = FormWindowState.Maximized
        FormVendor.Show()
    End Sub

    Private Sub ទនញToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ទនញToolStripMenuItem.Click
        FormProduct.MdiParent = Me
        FormProduct.WindowState = FormWindowState.Maximized
        FormProduct.Show()
    End Sub

    Private Sub កណតToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles កណតToolStripMenuItem.Click
        FormUserSetting.ShowDialog()

    End Sub

    Private Sub FormMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim ci As New CultureInfo(My.Settings.Languguage)
        Thread.CurrentThread.CurrentCulture = ci
        Thread.CurrentThread.CurrentUICulture = ci

    End Sub

    Private Sub ករទញទនញToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ករទញទនញToolStripMenuItem.Click

        FormPurchase.MdiParent = Me
        FormPurchase.WindowState = FormWindowState.Maximized
        FormPurchase.Show()
    End Sub

    Private Sub វកកយបតរToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles វកកយបតរToolStripMenuItem.Click
        Dim frm As New FormInvoiceView
        frm.WindowState = FormWindowState.Maximized
        frm.Show()
        frm.MdiParent = Me
    End Sub
End Class